export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface basePage {
  currentPage?: number
  pageSize?: number
}

export interface SearchUser extends basePage {
  name?: string
  jobNumber?: string
}

export interface User {
  id?: number
  createTime?: string
  updateTime?: string
  isDel?: boolean
  userName?: string
  password?: string
  jobNumber?: string
  mobile?: null
  roleName?: string[]
  avatar?: string
  authData?: string
}

export type Records = User[]

export interface UserResponseData extends ResponseData {
  data: {
    records: Records
    total: number
    size: number
    current: number
    pages: number
  }
}

export interface UserListResponseData extends ResponseData {
  data: User[]
}

export interface RoleData {
  id?: number
  name: string
}

export type AllRole = RoleData[]
export interface AllRoleResponseData extends ResponseData {
  data: AllRole
}

export interface SetRoleData {
  authData: string[]
  userId: number
}
